<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - com.google.code.jouka.utils.FileChUtil</h5>
<div class="separator">&nbsp;</div>
<table class="report">
<thead><tr>  <td class="heading">Classes in this File</td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
  <tr><td><a href="com.google.code.jouka.utils.FileChUtil.html">FileChUtil</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">79%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:79px"><span class="text">404/507</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">71%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:71px"><span class="text">167/232</span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.526315789473684;</span>4.526</td></tr>

</table>
<div class="separator">&nbsp;</div>
<table cellspacing="0" cellpadding="0" class="src">
<tr>  <td class="numLine">&nbsp;1</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">package</span> com.google.code.jouka.utils;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;3</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.File;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;4</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.FileInputStream;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;5</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.FileOutputStream;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;6</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.IOException;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;7</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.RandomAccessFile;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;8</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.io.UnsupportedEncodingException;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;9</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.Buffer;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;10</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.ByteBuffer;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;11</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.CharBuffer;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;12</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.MappedByteBuffer;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;13</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.channels.FileChannel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;14</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.channels.FileLock;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;15</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.channels.NonReadableChannelException;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;16</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.charset.Charset;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;17</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.nio.charset.CharsetDecoder;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;18</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Arrays;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;19</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashMap;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;20</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;21</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;22</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;23</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;<span class="keyword">public</span> <span class="keyword">class</span> FileChUtil {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;24</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;25</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;26</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ取得の際、ByteBuffer#allocate()を使う場合に指定。&lt;br&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;27</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * "java.nio.ByteBuffer.allocate(int capacity)" を使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;28</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 引数に指定されたバイト数の作業領域を確保したByteBufferオブジェクトを生成する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;29</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * このメソッドで生成されたByteBufferオブジェクトは、通常のJavaオブジェクトと</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;30</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 同様に処理を行う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;31</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;32</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> USE_ALLOCATED_BUFFER        = 0;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;33</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;34</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;35</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ取得の際、ByteBuffer#allocateDirect()を使う場合に指定。&lt;br&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;36</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * "java.nio.ByteBuffer.allocateDirect(int capacity)"を使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;37</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 引数に指定されたバイト数の作業領域を確保したByteBufferオブジェクトを生成する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;38</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * このメソッドで生成されたByteBufferオブジェクトは、ヒープ外のメモリを使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;39</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * プラットフォームネイティブの入出力操作を直接実行するダイレクトバッファを用いるため、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;40</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 非ダイレクトバッファよりも高速処理が可能がだ、割り当て/解放コストがやや高い。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;41</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 一般にダイレクトバッファの割り当ては、プログラムの性能を十分に改善できる</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;42</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 見込みがある場合にのみ、行うべきとされる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;43</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;44</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> USE_DIRECT_ALLOCATED_BUFFER = 1;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;45</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;46</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;47</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ取得の際、MappedByteBuffer(READ_ONLY)を使う場合に指定。&lt;br&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;48</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * "java.nio.channels.FileChannel.MapMode.READ_ONLY" を使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;49</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み取り専用のByteBufferオブジェクトが生成される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;50</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ファイルのメモリマップ領域を内容とするダイレクトByteBufferを介す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;51</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * マップされたByteBufferと、これによって表されるファイルマッピングは、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;52</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ自体がガベージコレクトされるまで有効。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;53</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ByteBufferオブジェクトに対して修正を加えようとすると、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;54</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 例外：ReadOnlyBufferExceptionがthrowされる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;55</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;56</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> USE_MAPMODE_READ_ONLY       = 2;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;57</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;58</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;59</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ取得の際、MappedByteBuffer(READ_WRITE)を使う場合に指定。&lt;br&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;60</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * "java.nio.channels.FileChannel.MapMode.READ_WRITE" を使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;61</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 書き込み可能なByteBufferオブジェクトが生成される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;62</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ファイルのメモリマップ領域を内容とするダイレクトByteBufferを介す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;63</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * マップされたByteBufferと、これによって表されるファイルマッピングは、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;64</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ自体がガベージコレクトされるまで有効。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;65</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 変更した内容は最終的に元のファイルに反映される</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;66</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;67</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> USE_MAPMODE_READ_WRITE      = 3;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;68</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;69</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;70</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ取得の際、ByteBuffer#wrap(byte[] array)を使う場合に指定。&lt;br&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;71</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファに変更を加えると配列も変更され、配列に変更を加えるとバッファも変更される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;72</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;73</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> USE_WRAPPED_BYTE_ARRAY      = 4;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;74</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;75</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;76</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/*</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;77</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * buffTypes note:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;78</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;79</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * [ READ ]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;80</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_ALLOCATED_BUFFER        : isDirect=false, isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;81</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_DIRECT_ALLOCATED_BUFFER : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;82</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_MAPMODE_READ_ONLY       : isDirect=true,  isReadOnly=true</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;83</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_MAPMODE_READ_WRITE      : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;84</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;85</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * [ WRITE ]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;86</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_ALLOCATED_BUFFER        : isDirect=false, isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;87</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_DIRECT_ALLOCATED_BUFFER : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;88</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_MAPMODE_READ_WRITE      : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;89</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     USE_WRAPPED_BYTE_ARRAY      : isDirect=false, isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;90</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;91</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String[] buffTypes = {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;92</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        <span class="string">"FileChUtil.USE_ALLOCATED_BUFFER"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;93</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;      , <span class="string">"FileChUtil.USE_DIRECT_ALLOCATED_BUFFER"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;94</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;      , <span class="string">"FileChUtil.USE_MAPMODE_READ_ONLY"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;95</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;      , <span class="string">"FileChUtil.USE_MAPMODE_READ_WRITE"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;96</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;      , <span class="string">"FileChUtil.USE_WRAPPED_BYTE_ARRAY"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;97</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    };</pre></td></tr>
<tr>  <td class="numLine">&nbsp;98</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;99</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> FileChannel.MapMode[] mapmode = {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;100</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          <span class="keyword">null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;101</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        , <span class="keyword">null</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;102</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        , FileChannel.MapMode.READ_ONLY</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;103</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        , FileChannel.MapMode.READ_WRITE</pre></td></tr>
<tr>  <td class="numLine">&nbsp;104</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        , <span class="keyword">null</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;105</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    };</pre></td></tr>
<tr>  <td class="numLine">&nbsp;106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/** FileChannel取得用の読み書き属性値 */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String MODE_READ         = <span class="string">"r"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;109</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String MODE_WRITE        = <span class="string">"w"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;110</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String MODE_READ_WRITE   = <span class="string">"rw"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> String MODE_APPEND       = <span class="string">"a"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;112</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;113</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;114</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;115</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの取得元となるFileStream自体を、FileChannelのhashcodeと共に保存するマップ。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;116</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * channelのclose時に、取得元のFileStreamも併せてcloseさせるために用いる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;117</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 取得元FileStreamのclose後は、FileStreamもHashMapから削除される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;118</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;119</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> HashMap&lt;Integer, Object&gt; objectMap = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;121</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの取得元となるFileStreamの種類を、FileChannelのhashcodeと共に保存するマップ。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;123</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * channelのclose時の取得元FileStreamのcloseと併せて、FileStream種類もHashMapから削除される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;124</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;125</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> HashMap&lt;Integer, Integer&gt; attrCodeMap = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;126</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">// FileChannelの取得元となるFileStreamの種類。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> FIS   = 0;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> FOS_W = 1;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> FOS_A = 2;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keyword">int</span> RAF   = 3;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> setObjectMap(<span class="keyword">int</span> hashCode, Object object, <span class="keyword">int</span> attrCode){</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;134</td>  <td class="nbHitsCovered"><a title="Line 134: Conditional coverage 100% (2/2).">&nbsp;161</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 134: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(objectMap == <span class="keyword">null</span>){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;135</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            objectMap = <span class="keyword">new</span> HashMap&lt;Integer, Object&gt;();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;137</td>  <td class="nbHitsCovered"><a title="Line 137: Conditional coverage 100% (2/2).">&nbsp;161</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 137: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(attrCodeMap == <span class="keyword">null</span>){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;138</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            attrCodeMap = <span class="keyword">new</span> HashMap&lt;Integer, Integer&gt;();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;139</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;140</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;        objectMap.put(hashCode, object);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;141</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;        attrCodeMap.put(hashCode, attrCode);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;142</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;144</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;145</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;146</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;147</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Fileオブジェクトから入出力のFileChannelを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;148</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   rw = "r":</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;149</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     return (new FileInputStream(file).getChannel())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   rw = "w":</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;152</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     return (new FileOutputStream(file).getChannel())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;153</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     ※ ファイルが既存であった場合、同名のゼロバイトの新規ファイルがとして作成される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;154</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     * got channel is overwritable if file is exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   rw = "rw":</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;157</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     return (new RandomAccessFile(file, rw).getChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   rw = "a":</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;160</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     return (new FileOutputStream(file, true).getChannel())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;161</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     ※ ファイルが既存であった場合、追記可能とする。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;162</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     * got channel is appendable if file is exist.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;163</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;164</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     File file = new File("C:\\WINDOWS\\explorer.exe");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     FileChannel ch = FileChUtil.newFileChannel(file, "r", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     System.out.println("File Size = " + ch.size() + "bytes.");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;171</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param file 対象ファイル</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param rw 入出力の区分。入力専用="r"、出力専用="w"、入出力用="rw"、追記用="a"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;175</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param enableException ファイルが存在しない場合に、明示的に例外を発生させたい場合はtrue。例外を発生させずNULLを返すだけならfalse。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;176</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;177</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;178</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(String , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel, boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;180</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;181</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;182</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel newFileChannel(File file, String rw, <span class="keyword">boolean</span> enableException) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;183</td>  <td class="nbHitsCovered"><a title="Line 183: Conditional coverage 100% (2/2).">&nbsp;172</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 183: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(file == <span class="keyword">null</span>) <span class="keyword">return</span> <span class="keyword">null</span>;</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;184</td>  <td class="nbHitsCovered"><a title="Line 184: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;170</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 184: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">if</span>(rw == <span class="keyword">null</span> || rw.length() == 0) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;185</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;186</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;187</td>  <td class="nbHitsCovered">&nbsp;168</td>  <td class="src"><pre class="src">&nbsp;        rw = rw.toLowerCase();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;188</td>  <td class="nbHitsCovered"><a title="Line 188: Conditional coverage 100% (2/2).">&nbsp;168</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 188: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (rw.equals(MODE_READ)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;189</td>  <td class="nbHitsCovered"><a title="Line 189: Conditional coverage 100% (2/2).">&nbsp;54</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 189: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (FileUtil.exists(file, enableException)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;190</td>  <td class="nbHitsCovered">&nbsp;52</td>  <td class="src"><pre class="src">&nbsp;                FileInputStream fis = <span class="keyword">new</span> FileInputStream(file);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;191</td>  <td class="nbHitsCovered">&nbsp;52</td>  <td class="src"><pre class="src">&nbsp;                FileChannel ch = fis.getChannel();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;192</td>  <td class="nbHitsCovered">&nbsp;52</td>  <td class="src"><pre class="src">&nbsp;                setObjectMap(ch.hashCode(), fis, FIS);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;193</td>  <td class="nbHitsCovered">&nbsp;52</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> ch;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;194</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;195</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;196</td>  <td class="nbHitsCovered"><a title="Line 196: Conditional coverage 100% (2/2).">&nbsp;114</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 196: Conditional coverage 100% (2/2).">        <span class="keyword">else</span> <span class="keyword">if</span> (rw.equals(MODE_WRITE)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;197</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;            FileOutputStream fos = <span class="keyword">new</span> FileOutputStream(file);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;198</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;            FileChannel ch = fos.getChannel();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;199</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;            setObjectMap(ch.hashCode(), fos, FOS_W);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;200</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ch;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;201</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;202</td>  <td class="nbHitsCovered"><a title="Line 202: Conditional coverage 100% (2/2).">&nbsp;74</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 202: Conditional coverage 100% (2/2).">        <span class="keyword">else</span> <span class="keyword">if</span> (rw.equals(MODE_APPEND)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;203</td>  <td class="nbHitsCovered"><a title="Line 203: Conditional coverage 100% (2/2).">&nbsp;46</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 203: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (FileUtil.exists(file, enableException)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;204</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                RandomAccessFile raf = <span class="keyword">new</span> RandomAccessFile(file, <span class="string">"rw"</span>);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;205</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                FileChannel ch = raf.getChannel();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;206</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                ch.position(ch.size());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;207</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                setObjectMap(ch.hashCode(), raf, FOS_A);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;208</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> ch;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;209</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;210</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;211</td>  <td class="nbHitsCovered"><a title="Line 211: Conditional coverage 100% (2/2).">&nbsp;28</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 211: Conditional coverage 100% (2/2).">        <span class="keyword">else</span> <span class="keyword">if</span> (rw.equals(MODE_READ_WRITE)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;212</td>  <td class="nbHitsCovered"><a title="Line 212: Conditional coverage 100% (2/2).">&nbsp;27</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 212: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (FileUtil.exists(file, enableException)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;213</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                RandomAccessFile raf = <span class="keyword">new</span> RandomAccessFile(file, rw);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;214</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                FileChannel ch = raf.getChannel();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;215</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                setObjectMap(ch.hashCode(), raf, RAF);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;216</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> ch;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;217</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;218</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;219</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;220</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                  <span class="string">"Illegal read/write type : ["</span>+rw+<span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;221</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                + <span class="string">"You can use following types for: \n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;222</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                + <span class="string">"  (1) Read Only  = \"r\"\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;223</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                + <span class="string">"  (2) Write Only = \"w\"\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;224</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                + <span class="string">"  (3) Read/Write = \"rw\"\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;225</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                + <span class="string">"  (4) Append     = \"a\""</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            );</pre></td></tr>
<tr>  <td class="numLine">&nbsp;227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;228</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;229</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;230</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;231</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;232</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;233</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ファイル名文字列から入出力のFileChannelを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * return (getNewFileChannel(new File(fileName), rw).getChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;236</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;237</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     FileChannel ch = FileChUtil.newFileChannel("C:\\WINDOWS\\explorer.exe", "r", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;238</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     System.out.println("File Size = " + ch.size() + "bytes.");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;239</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;240</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param fileName</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;242</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param rw</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;243</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param enableException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;244</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;245</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;246</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(File , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;247</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel, boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;248</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;249</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;250</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel newFileChannel(String fileName, String rw, <span class="keyword">boolean</span> enableException) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;251</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> newFileChannel(<span class="keyword">new</span> File(fileName), rw, enableException);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;252</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;253</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;254</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;255</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;256</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;257</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *バッファサイズ、バッファタイプを指定して、FileChannel#position()=0から読み込み用のByteBufferを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;258</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;259</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;260</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;261</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;262</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferSize</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;263</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;264</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;265</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #getReadBuffer(FileChannel , long , int , int )</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;266</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;267</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer getReadBuffer(FileChannel channel, <span class="keyword">int</span> bufferType, <span class="keyword">int</span> bufferSize) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;268</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> getReadBuffer(channel, 0, bufferType, bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;269</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;270</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;271</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;272</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;273</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;274</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファサイズ、バッファタイプ、チャネルの位置を指定して、FileChannelから読み込み用のByteBufferを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;275</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * --- バッファタイプにより取得されるバッファ ----</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;277</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_ALLOCATED_BUFFER        ; return ByteBuffer.allocate((int)channel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;278</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_DIRECT_ALLOCATED_BUFFER ; return ByteBuffer.allocateDirect((int)channel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;279</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_MAPMODE_READ_ONLY       ; return channel.map(FileChannel.MapMode. READ_ONLY,  chPosition, channel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;280</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_MAPMODE_READ_WRITE      ; return channel.map(FileChannel.MapMode. READ_WRITE, chPosition, channel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;281</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;282</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;283</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;284</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;285</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel FileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;286</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param initChPosition バッファ取得時に設定されるFileChannelのposition</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;287</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType 取得したいバッファの種類</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;288</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferSize バッファサイズ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;289</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;290</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;291</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;292</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer getReadBuffer(FileChannel channel, <span class="keyword">long</span> initChPosition, <span class="keyword">int</span> bufferType, <span class="keyword">int</span> bufferSize) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;293</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        channel.position(initChPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;294</td>  <td class="nbHitsCovered"><a title="Line 294: Conditional coverage 100% (5/5).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 294: Conditional coverage 100% (5/5).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;296</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocate(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;297</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;298</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocateDirect(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;299</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;300</td>  <td class="nbHitsUncovered"><a title="Line 300: Conditional coverage 50% (1/2).">&nbsp;3</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 300: Conditional coverage 50% (1/2).">            <span class="keyword">if</span>(channel.size() &lt; bufferSize){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;301</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                bufferSize = (<span class="keyword">int</span>) channel.size();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;302</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;303</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> channel.map(FileChannel.MapMode.READ_ONLY, initChPosition, bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;304</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_WRITE :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;305</td>  <td class="nbHitsCovered"><a title="Line 305: Conditional coverage 100% (2/2).">&nbsp;3</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 305: Conditional coverage 100% (2/2).">            <span class="keyword">if</span>(channel.size() &lt; bufferSize){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;306</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                bufferSize = (<span class="keyword">int</span>) channel.size();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;307</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;308</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> channel.map(FileChannel.MapMode.READ_WRITE, initChPosition, bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;309</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;310</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForReadBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;311</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;312</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;313</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;314</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;315</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;316</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;317</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelから出力用のByteBufferを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;318</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * その際、バッファサイズが指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;319</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 小さなバッファを用い、FileChannelに対して繰り返し処理でデータ出力をする場合に利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;320</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;321</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * --- バッファタイプにより取得されるバッファ ----</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;322</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_ALLOCATED_BUFFER        ; return ByteBuffer.allocate(bufferSize)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;323</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_DIRECT_ALLOCATED_BUFFER ; return ByteBuffer.allocateDirect(bufferSize)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;324</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_MAPMODE_READ_WRITE      ; return channel.map(FileChannel.MapMode.READ_WRITE, 0, bufferSize);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;325</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;326</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;327</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;328</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;329</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;330</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferSize</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;331</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;332</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;333</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;334</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer getWriteBuffer(FileChannel channel, <span class="keyword">int</span> bufferType, <span class="keyword">int</span> bufferSize) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;335</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> getWriteBuffer(channel, 0, bufferType, bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;336</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;337</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;338</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;339</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;340</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelから出力用のByteBufferを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;341</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * その際、バッファサイズと対象FileChannelのpositionが指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;342</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 小さなバッファを用い、FileChannelに対して繰り返し処理でデータ出力をする場合に利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;343</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;344</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * --- バッファタイプにより取得されるバッファ ----</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;345</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_ALLOCATED_BUFFER        ; return ByteBuffer.allocate(bufferSize)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;346</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_DIRECT_ALLOCATED_BUFFER ; return ByteBuffer.allocateDirect(bufferSize)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;347</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * bufferType = USE_MAPMODE_READ_WRITE      ; return channel.map(FileChannel.MapMode.READ_WRITE, chPosition, bufferSize);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;348</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;349</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;350</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;351</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;352</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param initChPosition FileChannelのposition</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;353</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;354</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferSize</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;355</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;356</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;357</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;358</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer getWriteBuffer(FileChannel channel, <span class="keyword">long</span> initChPosition, <span class="keyword">int</span> bufferType, <span class="keyword">int</span> bufferSize) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;359</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        checkWritable(channel);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;360</td>  <td class="nbHitsCovered"><a title="Line 360: Conditional coverage 100% (6/6).">&nbsp;13</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 360: Conditional coverage 100% (6/6).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;361</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;362</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            channel.position(initChPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;363</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocate(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;364</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;365</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            channel.position(initChPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;366</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocateDirect(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;367</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_WRITE :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;368</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            MappedByteBuffer buff = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;369</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;370</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;                    buff = channel.map(FileChannel.MapMode.READ_WRITE, initChPosition, bufferSize);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;371</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                } <span class="keyword">catch</span> (NonReadableChannelException e) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;372</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">throw</span> <span class="keyword">new</span> IOException(<span class="string">"[java.nio.channels.NonReadableChannelException] occured.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;373</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"If you call getWriteBuffer() with bufferType=USE_MAPMODE_READ_WRITE ,\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;374</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"you must to use 'FileChUtil.newFileChannel(arg1, \"RW\", arg3)'.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;375</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"--------"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;376</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    );</pre></td></tr>
<tr>  <td class="numLine">&nbsp;377</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;378</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            channel.position(initChPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;379</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> buff;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;380</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;381</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;382</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_WRAPPED_BYTE_ARRAY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;383</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;384</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;385</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;386</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;387</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForWriteBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;388</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;389</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;390</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;391</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;392</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;393</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;394</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * getWriteBuffer()用のFileChannelが書き出し用かどうかをチェックする</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;395</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;396</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;397</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;398</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;399</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;400</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> checkWritable(FileChannel channel) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;401</td>  <td class="nbHitsCovered"><a title="Line 401: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 401: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel == <span class="keyword">null</span>){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;402</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> NullPointerException(<span class="string">"channel is NULL."</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;403</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;404</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> foundChannelError = <span class="keyword">false</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;405</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        String channelErrMsg = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;406</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> chAttrCode = attrCodeMap.get(channel.hashCode());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;407</td>  <td class="nbHitsCovered"><a title="Line 407: Conditional coverage 100% (4/4).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 407: Conditional coverage 100% (4/4).">        <span class="keyword">switch</span> (chAttrCode) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;408</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FIS :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;409</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            foundChannelError = <span class="keyword">true</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;410</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channelErrMsg = <span class="string">"channel is for READ.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;411</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"This channel is derived from [FileChUtil.newFileChannel(file, \"R\" , true/false)].\n"</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;412</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;413</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FOS_W :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;414</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;415</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FOS_A :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;416</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            foundChannelError = <span class="keyword">true</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;417</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channelErrMsg = <span class="string">"channel is for APPEND.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;418</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"This channel is derived from [FileChUtil.newFileChannel(file, \"A\" , true/false)].\n"</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;419</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channelErrMsg = channelErrMsg + <span class="string">"----"</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;420</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;421</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;422</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;423</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;424</td>  <td class="nbHitsCovered"><a title="Line 424: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 424: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(foundChannelError){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;425</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(channelErrMsg</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;426</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">"If you get write-buffer, you need to use writable channel.\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;427</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">" 1) FileChUtil.newFileChannel(file, \"W\" , true/false)\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;428</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">" 2) FileChUtil.newFileChannel(file, \"RW\", true/false)\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;429</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">"--------"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;430</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    );</pre></td></tr>
<tr>  <td class="numLine">&nbsp;431</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;432</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;433</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;434</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;435</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;436</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;437</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;438</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 追記用のByteBufferを取得する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;439</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;440</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;441</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;442</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;443</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;444</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferSize</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;445</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;446</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;447</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;448</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer getAppendBuffer(FileChannel channel, <span class="keyword">int</span> bufferType, <span class="keyword">int</span> bufferSize) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;449</td>  <td class="nbHitsCovered">&nbsp;18</td>  <td class="src"><pre class="src">&nbsp;        checkAppendable(channel, bufferType);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;450</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">long</span> chPosition = channel.size();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;451</td>  <td class="nbHitsCovered"><a title="Line 451: Conditional coverage 100% (6/6).">&nbsp;14</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 451: Conditional coverage 100% (6/6).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;452</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;453</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;                channel.position(chPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;454</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocate(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;455</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;456</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;                channel.position(chPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;457</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> ByteBuffer.allocateDirect(bufferSize);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;458</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_WRITE :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;459</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            MappedByteBuffer buff =channel.map(FileChannel.MapMode.READ_WRITE, chPosition, bufferSize);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;460</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            channel.position(chPosition);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;461</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> buff;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;462</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;463</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;464</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_WRAPPED_BYTE_ARRAY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;465</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;466</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;467</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;468</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;469</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForAppendBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;470</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;471</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;472</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;473</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;474</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;475</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;476</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;477</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * getAppendBuffer()用のFileChannelが追記用かどうかをチェックする</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;478</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;479</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;480</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;481</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;482</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;483</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;484</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> checkAppendable(FileChannel channel, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;485</td>  <td class="nbHitsCovered"><a title="Line 485: Conditional coverage 100% (2/2).">&nbsp;18</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 485: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel == <span class="keyword">null</span>){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;486</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> NullPointerException(<span class="string">"channel is NULL."</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;487</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;488</td>  <td class="nbHitsCovered">&nbsp;17</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">boolean</span> foundChannelError = <span class="keyword">false</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;489</td>  <td class="nbHitsCovered">&nbsp;17</td>  <td class="src"><pre class="src">&nbsp;        String channelErrMsg = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;490</td>  <td class="nbHitsCovered">&nbsp;17</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> chAttrCode = attrCodeMap.get(channel.hashCode());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;491</td>  <td class="nbHitsCovered"><a title="Line 491: Conditional coverage 100% (4/4).">&nbsp;17</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 491: Conditional coverage 100% (4/4).">        <span class="keyword">switch</span> (chAttrCode) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;492</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FIS :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;493</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            foundChannelError = <span class="keyword">true</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;494</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channelErrMsg = <span class="string">"channel is for READ.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;495</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"This channel is derived from [FileChUtil.newFileChannel(file, \"R\" , true/false)].\n"</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;496</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;497</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FOS_W :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;498</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            foundChannelError = <span class="keyword">true</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;499</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channelErrMsg = <span class="string">"channel is for (OVER)WRITE.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;500</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"This channel is derived from [FileChUtil.newFileChannel(file, \"W\" , true/false)].\n"</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;501</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;502</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> FOS_A :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;503</td>  <td class="nbHitsCovered"><a title="Line 503: Conditional coverage 100% (2/2).">&nbsp;11</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 503: Conditional coverage 100% (2/2).">            <span class="keyword">if</span>(bufferType == USE_MAPMODE_READ_WRITE){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;504</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> IOException(<span class="string">"Miss match of channel and bufferType.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;505</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"if you use channel :\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;506</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"    [FileChUtil.newFileChannel(file, \"A\" , true/false)].\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;507</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"    you must to choice bufferType is :\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;508</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"        [USE_ALLOCATED_BUFFER] or [USE_DIRECT_ALLOCATED_BUFFER].\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;509</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"OR if you use bufferType :\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;510</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"    [USE_MAPMODE_READ_WRITE]\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;511</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"    you must to use channel :\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;512</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"        [FileChUtil.newFileChannel(file, \"RW\" , true/false)].\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;513</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                + <span class="string">"--------"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;514</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                );</pre></td></tr>
<tr>  <td class="numLine">&nbsp;515</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;516</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;517</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;518</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;519</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;520</td>  <td class="nbHitsCovered"><a title="Line 520: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 520: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(foundChannelError){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;521</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(channelErrMsg</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;522</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">"If you get append-buffer, you need to use appendable channel.\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;523</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">" 1) FileChUtil.newFileChannel(file, \"A\" , true/false)\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;524</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">" 2) FileChUtil.newFileChannel(file, \"RW\", true/false)\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;525</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    + <span class="string">"--------"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;526</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    );</pre></td></tr>
<tr>  <td class="numLine">&nbsp;527</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;528</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;529</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;530</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;531</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;532</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelにロックをおこなう。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;533</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;534</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;535</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;536</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileLockを返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;537</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;538</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #releaseQuietly(FileLock)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;539</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;540</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileLock lock(FileChannel channel) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;541</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;        FileLock lock = channel.tryLock();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;542</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> lock;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;543</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;544</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;545</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;546</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;547</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileLockを解除する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;548</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;549</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;550</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param lock lock()で取得したFileLockオブジェクト。HostOS側の排他制御は関与しない。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;551</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #lock(FileChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;552</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;553</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> releaseQuietly(FileLock lock) {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;554</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;555</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            lock.release();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;556</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">catch</span> (Exception e) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;557</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            lock = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;558</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;559</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;        lock = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;560</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;561</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;562</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;563</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;564</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;565</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;566</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;567</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelを例外を発生させずにcloseする。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;568</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * closeまでのステップは、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;569</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  1) channel.force(false);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;570</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  2) channel.close();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;571</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * となる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;572</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;573</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;574</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;575</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel, boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;576</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(File , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;577</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(String , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;578</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;579</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> closeQuietly(FileChannel channel) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;580</td>  <td class="nbHitsCovered">&nbsp;166</td>  <td class="src"><pre class="src">&nbsp;        closeQuietly(channel, <span class="keyword">false</span>);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;581</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;582</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;583</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;584</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;585</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;586</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelを例外を発生させずにcloseする。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;587</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * closeまでのステップは、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;588</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  1) channel.force(true / false);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;589</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  2) channel.close();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;590</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * となる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;591</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;592</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;593</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;594</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param chForceMeta</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;595</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #closeQuietly(FileChannel)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;596</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(File , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;597</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #newFileChannel(String , String , boolean)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;598</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;599</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> closeQuietly(FileChannel channel, <span class="keyword">boolean</span> chForceMeta) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;600</td>  <td class="nbHitsCovered"><a title="Line 600: Conditional coverage 100% (2/2).">&nbsp;166</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 600: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (channel == <span class="keyword">null</span>) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;601</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> NullPointerException(<span class="string">"channel is NULL."</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;602</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;603</td>  <td class="nbHitsCovered">&nbsp;164</td>  <td class="src"><pre class="src">&nbsp;        Object fileStream = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;604</td>  <td class="nbHitsCovered">&nbsp;164</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> key = channel.hashCode();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;605</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">try</span> {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;606</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;607</td>  <td class="nbHitsCovered"><a title="Line 607: Conditional coverage 100% (2/2).">&nbsp;164</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 607: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (!objectMap.containsKey(key)) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;608</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;609</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  channel is not retrieve from FileChUtil#newFileChannel()\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;610</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  or channel is closed already.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;611</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  you must to use [FileChUtil#newFileChannel()] for retrieving channel.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;612</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"--------"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;613</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;614</td>  <td class="nbHitsCovered"><a title="Line 614: Conditional coverage 100% (2/2).">&nbsp;161</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 614: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (!channel.isOpen()) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;615</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(<span class="string">"\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;616</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  channel is closed already.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;617</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  if channel closed without FileChUtil#closeQuietly(),\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;618</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"  you must to use [FileChUtil#closeQuietly()] for channel closing.\n"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;619</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"--------"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;620</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;621</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;622</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">int</span> chAttrCode = 0;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;623</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            channel.force(chForceMeta);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;624</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            channel.close();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;625</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            fileStream = objectMap.get(key);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;626</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            chAttrCode = attrCodeMap.get(key);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;627</td>  <td class="nbHitsCovered"><a title="Line 627: Conditional coverage 100% (5/5).">&nbsp;160</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 627: Conditional coverage 100% (5/5).">            <span class="keyword">switch</span> (chAttrCode) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;628</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">case</span> FIS:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;629</td>  <td class="nbHitsCovered">&nbsp;51</td>  <td class="src"><pre class="src">&nbsp;                ((FileInputStream)fileStream).close();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;630</td>  <td class="nbHitsCovered">&nbsp;51</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;631</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">case</span> FOS_W:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;632</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;                ((FileOutputStream)fileStream).close();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;633</td>  <td class="nbHitsCovered">&nbsp;40</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;634</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">case</span> FOS_A:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;635</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                ((RandomAccessFile)fileStream).close();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;636</td>  <td class="nbHitsCovered">&nbsp;44</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;637</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">case</span> RAF:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;638</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                ((RandomAccessFile)fileStream).close();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;639</td>  <td class="nbHitsCovered">&nbsp;25</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;640</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">default</span>:</pre></td></tr>
<tr>  <td class="numLine">&nbsp;641</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;642</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;643</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;            removeRefObj(key);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;644</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">catch</span> (Exception e) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;645</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            channel = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;646</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            fileStream = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;647</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> RuntimeException(e.getMessage());</pre></td></tr>
<tr>  <td class="numLine">&nbsp;648</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;649</td>  <td class="nbHitsCovered">&nbsp;160</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;650</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;651</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;652</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの取得元となるFileStreamをhashmapから削除する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;653</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの取得元となる「FileStreamの種類」をhashmapから削除する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;654</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;655</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ※FileChUtilTestクラスからも、リフレクションで実行されるので、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;656</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 　メソッド名変更等をおこなわないこと。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;657</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;658</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param key FileChannelオブジェクトのhashCode。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;659</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;660</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> removeRefObj(<span class="keyword">int</span> key){</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;661</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;        objectMap.remove(key);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;662</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;        attrCodeMap.remove(key);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;663</td>  <td class="nbHitsCovered">&nbsp;161</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;664</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;665</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;666</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> String getMessageForReadBufferTypeError(<span class="keyword">int</span> bufferType) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;667</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;        String message = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;668</td>  <td class="nbHitsCovered"><a title="Line 668: Conditional coverage 100% (2/2).">&nbsp;6</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 668: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(bufferType &lt; buffTypes.length){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;669</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            message = buffTypes[bufferType];</pre></td></tr>
<tr>  <td class="numLine">&nbsp;670</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;671</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            message = <span class="string">"N/A("</span> + bufferType + <span class="string">")"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;672</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;673</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> (<span class="string">"Illegal buffer type for READ : ["</span> + message + <span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;674</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;              + <span class="string">"--------"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;675</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;676</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;677</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;678</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> String getMessageForWriteBufferTypeError(<span class="keyword">int</span> bufferType) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;679</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;        String message = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;680</td>  <td class="nbHitsCovered"><a title="Line 680: Conditional coverage 100% (2/2).">&nbsp;8</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 680: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(bufferType &lt; buffTypes.length){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;681</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            message = buffTypes[bufferType];</pre></td></tr>
<tr>  <td class="numLine">&nbsp;682</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;683</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            message = <span class="string">"N/A("</span> + bufferType + <span class="string">")"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;684</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;685</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> (<span class="string">"Illegal buffer type for WRITE : ["</span> + message + <span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;686</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;              + <span class="string">"--------"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;687</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;688</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;689</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;690</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> String getMessageForAppendBufferTypeError(<span class="keyword">int</span> bufferType) {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;691</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        String message = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;692</td>  <td class="nbHitsCovered"><a title="Line 692: Conditional coverage 100% (2/2).">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 692: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(bufferType &lt; buffTypes.length){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;693</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            message = buffTypes[bufferType];</pre></td></tr>
<tr>  <td class="numLine">&nbsp;694</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;695</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            message = <span class="string">"N/A("</span> + bufferType + <span class="string">")"</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;696</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;697</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> (<span class="string">"Illegal buffer type for APPEND : ["</span> + message + <span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;698</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;              + <span class="string">"--------\n"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;699</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;700</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;701</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel incPosition(FileChannel channel, <span class="keyword">int</span> offset) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;702</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        channel.position(channel.position() + offset);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;703</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;704</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;705</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;706</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel decPosition(FileChannel channel, <span class="keyword">long</span> offset) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;707</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        channel.position(channel.position() - offset);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;708</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;709</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;710</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;711</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;712</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;713</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> String CBDump(FileChannel channel, ByteBuffer buff) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;714</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        StringBuilder sb = <span class="keyword">new</span> StringBuilder();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;715</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">int</span> savePos = buff.position();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;716</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">int</span> saveLim = buff.limit();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;717</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;718</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"{"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;719</td>  <td class="nbHitsUncovered"><a title="Line 719: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 719: Conditional coverage 0% (0/2).">        <span class="keyword">for</span>(<span class="keyword">int</span> i=0; i&lt;saveLim; i++){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;720</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">int</span> val = buff.get(i);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;721</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            sb.append(<span class="string">"0x"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;722</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            sb.append(Integer.toHexString(val));</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;723</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            sb.append(<span class="string">","</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;724</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;725</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"}"</span>).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;726</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"# buff.position() ="</span> + savePos).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;727</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"# buff.limit()    ="</span> + saveLim).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;728</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"# buff.capacity() ="</span> + buff.capacity()).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;729</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"# channel.positn()="</span> + channel.position()).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;730</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        sb.append(<span class="string">"# channel.size()  ="</span> + channel.size()).append(<span class="string">"\r\n"</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;731</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;732</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;733</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        buff.position(savePos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;734</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;735</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> sb.toString();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;736</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;737</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;738</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;739</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;740</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">boolean</span> lastPositionOf(FileChannel channel) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;741</td>  <td class="nbHitsUncovered"><a title="Line 741: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 741: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> (channel.position() == channel.size()) ? <span class="keyword">true</span> : <span class="keyword">false</span>;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;742</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;743</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;744</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">boolean</span> firstPositionOf(FileChannel channel) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;745</td>  <td class="nbHitsUncovered"><a title="Line 745: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 745: Conditional coverage 0% (0/2).">        <span class="keyword">return</span> (channel.position() == 0) ? <span class="keyword">true</span> : <span class="keyword">false</span>;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;746</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;747</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;748</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">boolean</span> isEOF(FileChannel channel, ByteBuffer buff) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;749</td>  <td class="nbHitsUncovered"><a title="Line 749: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 749: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">return</span> (channel.position() == channel.size() &amp;&amp; buff.position() == buff.limit()) ? <span class="keyword">true</span> : <span class="keyword">false</span>;</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;750</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;751</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;752</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuilder readLine_CRLF(FileChannel channel, ByteBuffer buff, <span class="keyword">int</span> buffType,</pre></td></tr>
<tr>  <td class="numLine">&nbsp;753</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            String charset, <span class="keyword">boolean</span> enableCRLF, <span class="keyword">byte</span> cr, <span class="keyword">byte</span> lf)</pre></td></tr>
<tr>  <td class="numLine">&nbsp;754</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;755</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;756</td>  <td class="nbHitsUncovered"><a title="Line 756: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 756: Conditional coverage 0% (0/2).">        <span class="keyword">if</span>(isEOF(channel, buff)){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;757</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;758</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;759</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;760</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        ByteBuilder bb = <span class="keyword">new</span> ByteBuilder(buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;761</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">boolean</span> foundCR = <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;762</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">boolean</span> foundLF = <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;763</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">boolean</span> exit = <span class="keyword">false</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;764</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;765</td>  <td class="nbHitsUncovered"><a title="Line 765: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 765: Conditional coverage 0% (0/2).">        <span class="keyword">while</span> (!exit) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;766</td>  <td class="nbHitsUncovered"><a title="Line 766: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 766: Conditional coverage 0% (0/2).">            <span class="keyword">if</span>(isEOF(channel, buff)){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;767</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                bb.setReferObject(-1);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;768</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> bb;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;769</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;770</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;771</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        String tmp = CBDump(channel, buff);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;772</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        System.out.println(<span class="string">"2) "</span>+channel.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;773</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        System.out.println(<span class="string">"2) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;774</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;775</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;776</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;777</td>  <td class="nbHitsUncovered"><a title="Line 777: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 777: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">            <span class="keyword">if</span>(firstPositionOf(channel) || !buff.hasRemaining()){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;778</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                buff = FileChUtil.read(channel, buff, buffType);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;779</td>  <td class="nbHitsUncovered"><a title="Line 779: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 779: Conditional coverage 0% (0/2).">                <span class="keyword">if</span>(buff == <span class="keyword">null</span>){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;780</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">break</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;781</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;782</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;783</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;784</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            System.out.println(<span class="string">"3) "</span>+channel.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;785</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            System.out.println(<span class="string">"3) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;786</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;787</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;788</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        tmp = CBDump(channel, buff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;789</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;790</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="comment">// buff内処理</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;791</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">int</span> bufPos = 0;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;792</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">int</span> bufLim = buff.limit();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;793</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">byte</span> b1 = 0;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;794</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">int</span> initBufPos = buff.position();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;795</td>  <td class="nbHitsUncovered"><a title="Line 795: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 795: Conditional coverage 0% (0/2).">            <span class="keyword">if</span>(initBufPos &gt; 0){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;796</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                bufPos = initBufPos;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;797</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;798</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;799</td>  <td class="nbHitsUncovered"><a title="Line 799: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 799: Conditional coverage 0% (0/2).">            <span class="keyword">while</span> (bufPos &lt; bufLim) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;800</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                System.out.println(<span class="string">"A) "</span>+channel.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;801</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                System.out.println(<span class="string">"A) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;802</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;803</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                b1 = buff.get(bufPos++);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;804</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;805</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                System.out.println(<span class="string">"B) "</span>+channel.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;806</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                System.out.println(<span class="string">"B) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;807</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;808</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">//bufPos=buff.position();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;809</td>  <td class="nbHitsUncovered"><a title="Line 809: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 809: Conditional coverage 0% (0/2).">                <span class="keyword">if</span>(b1 == cr){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;810</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    foundCR = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;811</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;812</td>  <td class="nbHitsUncovered"><a title="Line 812: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 812: Conditional coverage 0% (0/2).">                <span class="keyword">if</span>(b1 == lf){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;813</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    foundLF = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;814</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;815</td>  <td class="nbHitsUncovered"><a title="Line 815: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 815: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">                <span class="keyword">if</span>(foundCR &amp;&amp; foundLF){</a></span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;816</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                    <span class="comment">// CRLF発見</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;817</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    bb.append(buff, initBufPos, bufPos - initBufPos);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;818</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    exit = <span class="keyword">true</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;819</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    <span class="keyword">break</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;820</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;821</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;822</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                <span class="comment">// バッファ末尾</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;823</td>  <td class="nbHitsUncovered"><a title="Line 823: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 823: Conditional coverage 0% (0/2).">                <span class="keyword">if</span> (bufPos == bufLim) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;824</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    System.out.println(<span class="string">"SS1) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;825</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    buff.position(bufPos);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;826</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    System.out.println(<span class="string">"SS2) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;827</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    ByteBuffer tmpBuf = buff.duplicate();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;828</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    System.out.println(<span class="string">"SS3) "</span>+buff.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;829</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    System.out.println(<span class="string">"TT) "</span>+tmpBuf.hashCode());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;830</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                    bb.append(tmpBuf, initBufPos, buff.limit() - initBufPos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;831</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;832</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;833</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="comment">// end of while-buff</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;834</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;835</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;836</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;837</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="comment">// end of while-channel</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;838</td>  <td class="nbHitsUncovered"><a title="Line 838: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 838: Conditional coverage 0% (0/2).">        <span class="keyword">if</span>(buff != <span class="keyword">null</span>){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;839</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            bb.setReferObject(buff.position());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;840</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;841</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> bb;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;842</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;843</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;844</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;845</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;846</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;847</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;848</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;849</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;850</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;851</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;852</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;853</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;854</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;855</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;856</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    public static String readLineTmp(FileChannel channel, ByteBuffer buff, int buffType,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;857</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            String charset, boolean enableCRLF,byte[] eolCode)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;858</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            throws IOException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;859</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        if(channel.position() &gt;= channel.size()) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;860</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            return null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;861</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;862</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        ByteBuilder bb = new ByteBuilder(buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;863</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        byte[] dst = new byte[buff.capacity()];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;864</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        boolean foundCR = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;865</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        boolean foundLF = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;866</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;867</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        while (true) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;868</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            int readBytes = -1;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;869</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            readBytes = FileChUtil.readTo(dst, channel, buff, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;870</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(readBytes == -1){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;871</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;872</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;873</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;874</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // buff内処理</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;875</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            int bufPos = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;876</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            for (; bufPos &lt; readBytes - 1; bufPos++) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;877</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                b1 = dst[bufPos];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;878</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                b2 = dst[bufPos + 1];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;879</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;880</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                String sb1=Integer.toHexString(b1&amp;0xff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;881</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                String sb2=Integer.toHexString(b2&amp;0xff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;882</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                int   bLen=bb.length();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;883</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;884</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(b1==0x39 &amp;&amp; b2==0x39){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;885</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    //System.out.println("***");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;886</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    int tmp=0;if(tmp==0){;}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;887</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;888</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;889</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                //---- [CR], [CRLF] -----------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;890</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(cr &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;891</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b1 == cr) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;892</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;893</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(b2 == lf) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;894</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            // バッファ中にCRLFを発見</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;895</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;896</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(bufPos == 0) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;897</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 2));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;898</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;899</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;900</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(bufPos &lt; readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;901</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // バッファに読み込んだ分、channelも次の位置に移動しているため、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;902</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // バッファ途中に改行コードがあった場合は、以降のデータサイズ分、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;903</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // channelを戻して次の読み込みに備える</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;904</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                int adj = readBytes - bufPos - 2;// -2はCRLFぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;905</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;906</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;907</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;908</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;909</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // CRのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;910</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        int adj = readBytes - bufPos - 1;// -1はCRぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;911</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;912</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;913</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;914</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b2 == cr &amp;&amp; bufPos == readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;915</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // CR発見場所がbuff末尾で、LF未発見。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;916</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;917</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;918</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;919</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;920</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;921</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                //---- [LF] -------------------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;922</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(lf &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;923</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b1 == lf){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;924</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;925</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(bufPos == 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;926</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            // buff先頭にLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;927</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(foundCR) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;928</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // すでにCR発見済み＝CRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;929</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 1));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;930</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // ByteBuilderに詰めて返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;931</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                bb.append(b1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;932</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                if(!enableCRLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;933</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                    // 末尾のCRLFを無視(削除)して返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;934</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                    return bb.newString(charset, 0, -2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;935</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;936</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;937</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;938</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // buff先頭にLF、CRはここまで無し＝LFのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;939</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 1));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;940</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;941</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;942</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;943</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(bufPos &lt; readBytes - 1) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;944</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            int adj = readBytes - bufPos - 1;// -1はLFぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;945</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;946</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;947</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;948</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // buff末尾の1バイトがちょうどLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;949</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;950</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;951</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b2 == lf &amp;&amp; bufPos == readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;952</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // LF発見場所がbuff末尾で、LF未発見。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;953</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;954</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;955</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;956</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;957</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;958</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            } // end of for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;959</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;960</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // CR,LFをbuff末尾に見つけた場合、または</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;961</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // CRが前buff末尾、LFが次buff先頭にあった場合の処理</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;962</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(foundCR) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;963</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(foundLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;964</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    // CRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;965</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(bufPos &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;966</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // LFがbuff先頭に無い</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;967</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;968</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;969</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(!enableCRLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;970</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // 末尾のCRLFを無視(削除)して返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;971</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        return bb.newString(charset, 0, -2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;972</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;973</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }else if(bufPos == readBytes - 2){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;974</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    // LF無し、末尾にCRのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;975</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;976</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;977</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;978</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 0);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;979</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;980</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;981</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;982</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;983</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;984</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;985</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;986</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;987</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;988</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;989</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            } else if(foundLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;990</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if (bufPos == readBytes - 2 &amp;&amp; b2 == lf) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;991</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    bufPos++;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;992</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;993</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;994</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    bufPos++;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;995</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;996</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                bb.append(dst, 0, bufPos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;997</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;998</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;999</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                // このバッファ内にCRLF無し</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1000</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1001</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1002</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        } // end of while</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1003</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return bb.newString(charset);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1004</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1005</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1006</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1007</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1008</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1009</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    public static String readLine(FileChannel channel, ByteBuffer buff, int buffType,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1010</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            String charset, boolean enableCRLF,byte cr, byte lf)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1011</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            throws IOException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1012</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        if(channel.position() &gt;= channel.size()) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1013</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            return null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1014</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1015</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        ByteBuilder bb = new ByteBuilder(buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1016</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        byte[] dst = new byte[buff.capacity()];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1017</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        boolean foundCR = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1018</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        boolean foundLF = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1019</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1020</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        byte b1 = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1021</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        byte b2 = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1022</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        while (true) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1023</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            int readBytes = -1;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1024</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            readBytes = FileChUtil.readTo(dst, channel, buff, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1025</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(readBytes == -1){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1026</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1027</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1028</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1029</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // buff内処理</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1030</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            int bufPos = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1031</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            for (; bufPos &lt; readBytes - 1; bufPos++) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1032</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                b1 = dst[bufPos];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1033</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                b2 = dst[bufPos + 1];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1034</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1035</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                String sb1=Integer.toHexString(b1&amp;0xff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1036</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                String sb2=Integer.toHexString(b2&amp;0xff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1037</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                int   bLen=bb.length();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1038</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1039</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                if(b1==0x39 &amp;&amp; b2==0x39){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1040</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                    //System.out.println("***");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1041</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                    int tmp=0;if(tmp==0){;}</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1042</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">////                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1043</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1044</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                //---- [CR], [CRLF] -----------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1045</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(cr &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1046</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b1 == cr) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1047</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1048</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(b2 == lf) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1049</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            // バッファ中にCRLFを発見</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1050</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1051</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(bufPos == 0) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1052</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 2));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1053</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1054</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1055</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(bufPos &lt; readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1056</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // バッファに読み込んだ分、channelも次の位置に移動しているため、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1057</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // バッファ途中に改行コードがあった場合は、以降のデータサイズ分、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1058</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // channelを戻して次の読み込みに備える</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1059</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                int adj = readBytes - bufPos - 2;// -2はCRLFぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1060</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1061</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1062</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1063</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1064</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // CRのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1065</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        int adj = readBytes - bufPos - 1;// -1はCRぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1066</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1067</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1068</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1069</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b2 == cr &amp;&amp; bufPos == readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1070</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // CR発見場所がbuff末尾で、LF未発見。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1071</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1072</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1073</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1074</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1075</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1076</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                //---- [LF] -------------------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1077</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(lf &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1078</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b1 == lf){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1079</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1080</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(bufPos == 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1081</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            // buff先頭にLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1082</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            if(foundCR) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1083</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // すでにCR発見済み＝CRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1084</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 1));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1085</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // ByteBuilderに詰めて返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1086</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                bb.append(b1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1087</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                if(!enableCRLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1088</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                    // 末尾のCRLFを無視(削除)して返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1089</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                    return bb.newString(charset, 0, -2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1090</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1091</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1092</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1093</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                // buff先頭にLF、CRはここまで無し＝LFのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1094</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                channel.position(channel.position() - (readBytes - 1));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1095</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1096</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1097</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1098</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        if(bufPos &lt; readBytes - 1) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1099</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            int adj = readBytes - bufPos - 1;// -1はLFぶん</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1100</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            channel.position(channel.position() - adj);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1101</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                            break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1102</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1103</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // buff末尾の1バイトがちょうどLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1104</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1105</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(b2 == lf &amp;&amp; bufPos == readBytes - 2) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // LF発見場所がbuff末尾で、LF未発見。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundCR = false;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1109</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        foundLF = true;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1110</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1112</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1113</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            } // end of for</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1114</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1115</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // CR,LFをbuff末尾に見つけた場合、または</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1116</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            // CRが前buff末尾、LFが次buff先頭にあった場合の処理</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1117</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(foundCR) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1118</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if(foundLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1119</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    // CRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(bufPos &gt; 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1121</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // LFがbuff先頭に無い</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1123</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1124</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if(!enableCRLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1125</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        // 末尾のCRLFを無視(削除)して返す</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1126</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        return bb.newString(charset, 0, -2);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }else if(bufPos == readBytes - 2){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    // LF無し、末尾にCRのみ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 0);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1134</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1135</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1137</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1138</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1139</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1140</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                        bb.append(dst, 0, bufPos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1141</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1142</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1144</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            } else if(foundLF){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1145</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if (bufPos == readBytes - 2 &amp;&amp; b2 == lf) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1146</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    bufPos++;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1147</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1148</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                if (enableCRLF) {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1149</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                    bufPos++;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                bb.append(dst, 0, bufPos);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1152</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                break;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1153</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }else{</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1154</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                // このバッファ内にCRLF無し</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                bb.append(dst, 0, bufPos + 1);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1157</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        } // end of while</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return bb.newString(charset);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1160</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1161</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1162</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1163</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1164</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 改行コードがCR+LF(\r\n)であるファイルから１行読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param charset</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1171</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param enableCRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1175</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    public static String readLine_CRLF(FileChannel channel, ByteBuffer buff, int buffType,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1176</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            String charset, boolean enableCRLF)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1177</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            throws IOException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1178</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return readLine(channel, buff, buffType, charset, enableCRLF, (byte)'\r', (byte)'\n');</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1180</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1181</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1182</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1183</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1184</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 改行コードがCR(\r)であるファイルから１行読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1185</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1186</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1187</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1188</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1189</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1190</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param charset</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1191</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param enableCRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1192</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1193</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1194</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1195</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    public static String readLine_CR(FileChannel channel, ByteBuffer buff, int buffType,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1196</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            String charset, boolean enableCRLF)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1197</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            throws IOException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1198</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1199</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return readLine(channel, buff, buffType, charset, enableCRLF, (byte)'\r', (byte)0x00);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1200</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1201</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1202</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1203</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1204</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 改行コードがLF(\n)であるファイルから１行読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1205</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1206</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1207</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1208</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1209</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1210</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param charset</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1211</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param enableCRLF</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1212</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1213</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1214</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1215</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    public static String readLine_LF(FileChannel channel, ByteBuffer buff, int buffType,</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1216</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            String charset, boolean enableCRLF)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1217</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            throws IOException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1218</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1219</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return readLine(channel, buff, buffType, charset, enableCRLF, (byte)0x00, (byte)'\n');</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1220</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1221</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1222</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1223</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1224</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1225</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの現在のポジションからからByteBufferで定義されたバッファにデータを読み込み、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * データが読み込まれたByteBufferを返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1228</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelから読み込まれるデータが無くなった場合、戻り値として null を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1229</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1230</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 大きなサイズのファイルを、小さなバッファを介して断続的・順番に読み込む場合などに利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1231</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 一回に読み込まれるデータサイズの上限は、バッファサイズに依存する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1232</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1233</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込んだバイト数を知りたい場合は、ByteBuffer#limit()を用いる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み元となるFileChannelに対して、事前にFileChannel#position(long newPosition)を</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1236</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 実行することで、読み込み開始位置を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1237</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1238</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1239</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1240</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1242</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   4) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1243</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1244</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ※ FileChUtil.USE_MAPMODE_READ_* を使う場合、メソッドを呼ぶたびに</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1245</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    FileChannelのpositionを変更し、ByteBuffに再マッピングする。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1246</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1247</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ※ FileChUtil.USE_ALLOCATED_BUFFER、USE_DIRECT_ALLOCATED_BUFFERを使う場合、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1248</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    返されるByteBuffはflip()されている。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1249</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1250</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/PRE&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1251</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1252</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1253</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff データを読み込むバッファ(データ終端の場合はnull))</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1254</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1255</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return データが読み込まれたByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1256</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1257</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1258</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> ByteBuffer read(FileChannel channel, ByteBuffer buff, <span class="keyword">int</span> buffType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1259</td>  <td class="nbHitsCovered"><a title="Line 1259: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1259: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">if</span>(buffType == USE_ALLOCATED_BUFFER || buffType == USE_DIRECT_ALLOCATED_BUFFER) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1260</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            buff.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1261</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            channel.read(buff);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1262</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            buff.flip();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1263</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(buff.limit() == 0){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1264</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                buff = null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1265</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1266</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> buff;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1267</td>  <td class="nbHitsUncovered"><a title="Line 1267: Conditional coverage 75% (3/4) [each condition: 100%, 50%].">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1267: Conditional coverage 75% (3/4) [each condition: 100%, 50%].">        }<span class="keyword">else</span> <span class="keyword">if</span>(buffType == USE_MAPMODE_READ_ONLY || buffType == USE_MAPMODE_READ_WRITE){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1268</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            buff.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1269</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">long</span> chRemain = channel.size() - channel.position();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1270</td>  <td class="nbHitsUncovered"><a title="Line 1270: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1270: Conditional coverage 50% (1/2).">            <span class="keyword">if</span> (chRemain == 0) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1271</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                buff = channel.map(mapmode[buffType], channel.position()-buff.limit(), buff.limit());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1272</td>  <td class="nbHitsUncovered"><a title="Line 1272: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1272: Conditional coverage 50% (1/2).">            }<span class="keyword">else</span> <span class="keyword">if</span> (chRemain &gt; buff.capacity()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1273</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                buff = channel.map(mapmode[buffType], channel.position(), buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1274</td>  <td class="nbHitsUncovered"><a title="Line 1274: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1274: Conditional coverage 50% (1/2).">            }<span class="keyword">else</span> <span class="keyword">if</span> (chRemain &gt; 0){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1275</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                buff = channel.map(mapmode[buffType], channel.position(), chRemain);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1277</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            channel.position(channel.position() + buff.limit());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1278</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> buff;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1279</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1280</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForReadBufferTypeError(buffType));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1281</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1282</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1283</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1284</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1285</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1286</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1287</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1288</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1289</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからbyte配列にデータを読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1290</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelの現在のポジションからByteBufferを経由して、byte配列にデータを読み込み、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1291</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込んだバイト数を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1292</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelから読み込まれるデータが無くなった場合、戻り値として -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1293</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1294</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 大きなサイズのファイルを、小さなバッファを介して断続的・順番に読み込む場合などに利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 一回に読み込まれるデータサイズの上限は、バッファサイズに依存する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1296</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1297</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ByteBufferのバッファサイズと、byte配列のサイズは同じである必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1298</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 両者のサイズが異なる場合は、IllegalArgumentExceptionが発生する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1299</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1300</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからByteBufferへ最後に読み込んだデータ群のサイズが</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1301</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 格納先のbyte配列サイズより小さい場合は、byte配列の最終読み込み位置以降は</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1302</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 0x00で埋められる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1303</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1304</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み元となるFileChannelに対して、事前にFileChannel#position(long newPosition)を</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1305</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 実行することで、読み込み開始位置を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1306</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1307</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1308</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1309</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1310</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1311</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   4) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1312</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1313</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * ※ FileChUtil.USE_MAPMODE_READ_* を使う場合、メソッドを呼ぶたびに</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1314</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    FileChannelのpositionを変更し、ByteBuffに再マッピングする。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1315</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1316</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1317</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example : Read from binary file to byte array and delete file.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1318</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      read target binary file : "C:\temp\test.bin"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1319</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      hex content (48 bytes) :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1320</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1321</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1322</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1323</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1324</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1325</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1326</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #======= Use (direct) allocated buffer  ============================</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1327</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - buffer size       : 10 bytes</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1328</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - using buffer type : ByteBuffer.allocateDirect(10)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1329</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #                       (or ByteBuffer.allocate(10))</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1330</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - start offset of FileChannel position : 32</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1331</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #===================================================================</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1332</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1333</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      File        file = new File("C:\\temp\\test.bin");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1334</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int buffType     = FileChUtil.USE_DIRECT_ALLOCATED_BUFFER;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1335</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //int buffType   = FileChUtil.USE_ALLOCATED_BUFFER;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1336</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1337</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChannel ch   = FileChUtil.newFileChannel(file, "r", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1338</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ByteBuffer  buf  = FileChUtil.getReadBuffer(ch, 0, buffType, 10);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1339</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1340</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      byte[] data = new byte[buf.capacity()];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1341</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ch.position(32);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1342</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int readCount = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1343</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1344</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29}, readCount = 10</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1345</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1346</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x00, 0x00, 0x00, 0x00}, readCount = 6</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1347</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1348</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, readCount = -1</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1349</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1350</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.closeQuietly(ch);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1351</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1352</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** if you want to delete source file;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1353</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //buf = null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1354</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //file.delete();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1355</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1356</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #======= Use 'FileChannel.MapMode' =====================================</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1357</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - buffer size       : 10 bytes</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1358</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - using buffer type : channel.map(FileChannel.MapMode.READ_ONLY)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1359</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #                       (or channel.map(FileChannel.MapMode.READ_WRITE) )</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1360</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      # - start offset of FileChannel position : 32</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1361</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      #=======================================================================</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1362</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1363</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      File        file = new File("C:\\temp\\test.bin");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1364</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int buffType     = FileChUtil.USE_MAPMODE_READ_ONLY;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1365</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //int buffType   = FileChUtil.USE_MAPMODE_READ_WRITE;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1366</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1367</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChannel ch   = FileChUtil.newFileChannel(file, "r", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1368</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // FileChannel ch= FileChUtil.newFileChannel(file, "rw", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1369</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ByteBuffer  buf  = FileChUtil.getReadBuffer(ch, 0, buffType, 10);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1370</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1371</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      byte[] data = new byte[buf.capacity()];</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1372</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ch.position(32);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1373</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int readCount = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1374</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1375</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29}, readCount = 10</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1376</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1377</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x00, 0x00, 0x00, 0x00}, readCount = 6</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1378</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      readCount = FileChUtil.readTo(data,  ch, buf, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1379</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // data = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, readCount = -1</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1380</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1381</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.closeQuietly(ch);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1382</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1383</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** if you want to delete source file;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1384</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //buf = null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1385</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //System.gc();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1386</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //file.delete();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1387</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1388</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** Win32上で、FileChannel#MapModeを使った際に、対象fileを</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1389</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** 削除するには、まずバッファにNULLをセットしてからgcを実行する必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1390</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** need to set NULL to buffer and call gc</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1391</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** before delete file when using FileChannel#MapMode on Win32.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1392</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1393</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1394</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1395</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param dst ファイルから読み込んだデータを格納するバイト配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1396</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1397</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff getReadBuffer()で取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1398</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_ONLY / USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1399</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 読み込んだバイト数。ファイル終端なら -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1400</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1401</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1402</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> readTo(<span class="keyword">byte</span>[] dst, FileChannel channel, ByteBuffer buff, <span class="keyword">int</span> buffType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1403</td>  <td class="nbHitsCovered"><a title="Line 1403: Conditional coverage 100% (2/2).">&nbsp;14</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1403: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (buff.capacity() != dst.length) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1404</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Size of 'buff' and length of 'dst' should be the same.\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1405</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"    (ByteBuffer) buff.capacity() = ["</span> + buff.capacity() + <span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1406</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"    (byte[]) dst.length          = ["</span> + dst.length     + <span class="string">"]\n"</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1407</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                        + <span class="string">"--------"</span>);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1408</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1409</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1410</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//* [ READ ]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1411</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_ALLOCATED_BUFFER        : isDirect=false, isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1412</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_DIRECT_ALLOCATED_BUFFER : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1413</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_READ_WRITE      : isDirect=true,  isReadOnly=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1414</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_READ_ONLY       : isDirect=true,  isReadOnly=true</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1415</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> readBytes = -1;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1416</td>  <td class="nbHitsCovered"><a title="Line 1416: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;13</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1416: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">if</span>(buffType == USE_ALLOCATED_BUFFER || buffType == USE_DIRECT_ALLOCATED_BUFFER) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1417</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;            buff.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1418</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;            readBytes = channel.read(buff);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1419</td>  <td class="nbHitsCovered"><a title="Line 1419: Conditional coverage 100% (2/2).">&nbsp;6</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1419: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (readBytes &lt; 0) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1420</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                Arrays.fill(dst, (<span class="keyword">byte</span>) 0x00);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1421</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> readBytes;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1422</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1423</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            buff.flip();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1424</td>  <td class="nbHitsCovered"><a title="Line 1424: Conditional coverage 100% (2/2).">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1424: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (readBytes &lt; buff.capacity()) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1425</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                (buff).get(dst, 0, readBytes);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1426</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                Arrays.fill(dst, readBytes, dst.length, (<span class="keyword">byte</span>) 0x00);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1427</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1428</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                (buff).get(dst);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1429</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1430</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readBytes;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1431</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1432</td>  <td class="nbHitsCovered"><a title="Line 1432: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;7</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1432: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">else</span> <span class="keyword">if</span>(buffType == USE_MAPMODE_READ_ONLY || buffType == USE_MAPMODE_READ_WRITE){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1433</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;          <span class="keyword">long</span> chRemain = channel.size() - channel.position();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1434</td>  <td class="nbHitsCovered"><a title="Line 1434: Conditional coverage 100% (2/2).">&nbsp;6</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1434: Conditional coverage 100% (2/2).">          <span class="keyword">if</span> (chRemain == 0) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1435</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              readBytes = -1;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1436</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              Arrays.fill(dst, (<span class="keyword">byte</span>) 0x00);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1437</td>  <td class="nbHitsCovered"><a title="Line 1437: Conditional coverage 100% (2/2).">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1437: Conditional coverage 100% (2/2).">          } <span class="keyword">else</span> <span class="keyword">if</span> (chRemain &gt; buff.capacity()) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1438</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              buff = channel.map(mapmode[buffType], channel.position(), buff.capacity());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1439</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              (buff).get(dst);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1440</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              readBytes = buff.capacity();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1441</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1442</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              buff = channel.map(mapmode[buffType], channel.position(), chRemain);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1443</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              (buff).get(dst, 0, (<span class="keyword">int</span>) chRemain);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1444</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              Arrays.fill(dst, (<span class="keyword">int</span>) chRemain, dst.length, (<span class="keyword">byte</span>) 0x00);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1445</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;              readBytes = (<span class="keyword">int</span>) chRemain;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1446</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;          }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1447</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;          channel.position(channel.position() + buff.position());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1448</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;          <span class="keyword">return</span> readBytes;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1449</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1450</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForReadBufferTypeError(buffType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1451</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1452</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1453</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1454</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1455</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1456</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1457</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1458</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1459</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1460</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからbyte配列への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1461</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1462</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み用の bufferType には、次の３種類を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1463</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1464</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1465</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1466</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1467</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1468</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1469</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType 読み込みに使うバッファタイプ。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1470</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileChannelからの読み込みが完了したbyte配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1471</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1472</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1473</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] readToBytes(FileChannel channel, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1474</td>  <td class="nbHitsCovered"><a title="Line 1474: Conditional coverage 100% (4/4).">&nbsp;32</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1474: Conditional coverage 100% (4/4).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1475</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1476</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToBytesViaAB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1477</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1478</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToBytesViaDAB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1479</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1480</td>  <td class="nbHitsCovered">&nbsp;7</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToBytesViaMBB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1481</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1482</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForReadBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1483</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1484</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1485</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1486</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1487</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからbyte配列への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1488</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1489</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * "ByteBuffer.allocate(int capacity)" を使う。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1490</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1491</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * read (binary) file to byte array.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1492</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * using : ByteBuffer.allocate((int)inputChannel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1493</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannel -&gt; ByteBuffer -&gt; byte[]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1494</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1495</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1496</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1497</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 読み込まれたバイト配列 / byte array as result</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1498</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1499</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1500</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] readToBytesViaAB(FileChannel channel) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1501</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocate((<span class="keyword">int</span>)channel.size());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1502</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        channel.read(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1503</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        buf.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1504</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] bytes = <span class="keyword">new</span> <span class="keyword">byte</span>[ buf.capacity()];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1505</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        buf.get(bytes);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1506</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1507</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> bytes;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1508</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1509</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1510</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1511</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1512</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからbyte配列への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1513</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1514</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * read (binary) file to byte array.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1515</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * using : ByteBuffer.allocateDirect((int)inputChannel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1516</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannel -&gt; ByteBuffer -&gt; byte[]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1517</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1518</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1519</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1520</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 読み込まれたバイト配列 / byte array as result</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1521</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1522</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1523</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] readToBytesViaDAB(FileChannel channel) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1524</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocateDirect((<span class="keyword">int</span>)channel.size());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1525</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        channel.read(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1526</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        buf.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1527</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] bytes = <span class="keyword">new</span> <span class="keyword">byte</span>[buf.capacity()];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1528</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        buf.get(bytes);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1529</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1530</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> bytes;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1531</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1532</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1533</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1534</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1535</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからbyte配列への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1536</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1537</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * read (binary) file to byte array.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1538</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * using : inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size())</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1539</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannel -&gt; MappedByteBuffer -&gt; byte[]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1540</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1541</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1542</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1543</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 読み込まれたバイト配列 / byte array as result</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1544</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1545</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1546</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">byte</span>[] readToBytesViaMBB(FileChannel channel) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1547</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        MappedByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size());</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1548</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] data = <span class="keyword">new</span> <span class="keyword">byte</span>[(<span class="keyword">int</span>)buf.capacity()];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1549</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        buf.get(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1550</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1551</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> data;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1552</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1553</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1554</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1555</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1556</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1557</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1558</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelから連続したbyteデータを、int型データの下位8bit値としてint配列へ一括で読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1559</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1560</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み用の bufferType には、次の３種類を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1561</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1562</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1563</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1564</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1565</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1566</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1567</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1568</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1569</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType 読み込みに使うバッファタイプ。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1570</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileChannelからの読み込みが完了したint配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1571</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1572</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1573</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span>[] readToInts(FileChannel channel, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1574</td>  <td class="nbHitsCovered"><a title="Line 1574: Conditional coverage 100% (4/4).">&nbsp;10</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1574: Conditional coverage 100% (4/4).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1575</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1576</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToIntsViaAB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1577</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1578</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToIntsViaDAB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1579</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY:</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1580</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> readToIntsViaMBB(channel);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1581</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1582</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForReadBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1583</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1584</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1585</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span>[] readToIntsViaAB(FileChannel channel) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1586</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] src = readToBytesViaAB(channel);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1587</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span>[] data = <span class="keyword">new</span> <span class="keyword">int</span>[src.length];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1588</td>  <td class="nbHitsCovered"><a title="Line 1588: Conditional coverage 100% (2/2).">&nbsp;41</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1588: Conditional coverage 100% (2/2).">        <span class="keyword">for</span>(<span class="keyword">int</span> i=0; i&lt;src.length; i++){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1589</td>  <td class="nbHitsCovered">&nbsp;37</td>  <td class="src"><pre class="src">&nbsp;            data[i] = src[i] &amp; 0xFF;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1590</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1591</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> data;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1592</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1593</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1594</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span>[] readToIntsViaDAB(FileChannel channel) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1595</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] src = readToBytesViaDAB(channel);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1596</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span>[] data = <span class="keyword">new</span> <span class="keyword">int</span>[src.length];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1597</td>  <td class="nbHitsCovered"><a title="Line 1597: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1597: Conditional coverage 100% (2/2).">        <span class="keyword">for</span>(<span class="keyword">int</span> i=0; i&lt;src.length; i++){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1598</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;            data[i] = src[i] &amp; 0xFF;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1599</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1600</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> data;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1601</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1602</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1603</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">int</span>[] readToIntsViaMBB(FileChannel channel) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1604</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] src = readToBytesViaMBB(channel);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1605</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span>[] data = <span class="keyword">new</span> <span class="keyword">int</span>[src.length];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1606</td>  <td class="nbHitsCovered"><a title="Line 1606: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1606: Conditional coverage 100% (2/2).">        <span class="keyword">for</span>(<span class="keyword">int</span> i=0; i&lt;src.length; i++){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1607</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;            data[i] = src[i] &amp; 0xFF;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1608</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1609</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> data;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1610</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1611</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1612</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1613</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1614</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1615</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからString型への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1616</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1617</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み用の bufferType には、次の３種類を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1618</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1619</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1620</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1621</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1622</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1623</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1624</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 対象FileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1625</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType バッファタイプ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1626</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileChannelからの読み込みが完了したStringオブジェクト</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1627</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1628</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1629</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> String readToStr(FileChannel channel, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1630</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> String(readToBytes(channel, bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1631</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1632</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1633</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1634</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1635</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからエンコードを指定したString型への一括読み込み。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1636</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 任意の文字エンコードで書かれたファイルを読み取り、UTF8形式のStringオブジェクトに格納する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1637</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1638</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 読み込み用の bufferType には、次の３種類を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1639</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1640</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1641</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   (3) FileChUtil.USE_MAPMODE_READ_ONLY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1642</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1643</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1644</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1645</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1646</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 対象FileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1647</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType バッファタイプ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1648</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param encoding 対象FileChannelが扱っているファイル内データのエンコーディング</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1649</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileChannelからの読み込みが完了したStringオブジェクト</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1650</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1651</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1652</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> String readToStr(FileChannel channel, <span class="keyword">int</span> bufferType, String encoding) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1653</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> <span class="keyword">new</span> String(readToBytes(channel, bufferType), encoding);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1654</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1655</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1656</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1657</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1658</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1659</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してbyte配列のデータを出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1660</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * byte配列のデータを、FileChannelの現在のポジション以降に対しByteBufferを経由して出力し、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1661</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力したバイト数を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1662</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力ソースとなるbyte配列データ中の、出力オフセットであるsrcOffsetが配列末尾または</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1663</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * それを越えた場合は出力はおこなわれず、戻り値として -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1664</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1665</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * byte配列データを、小さなバッファを介しFileChannelに断続的・順番に書き出す場合などに利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1666</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 一回に書き出されるサイズの上限は、バッファサイズに依存する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1667</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1668</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力ソース中の起点オフセットであるsrcOffsetは、出力毎に更新する必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1669</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1670</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 対象となるFileChannelに対して、事前にFileChannel#position(long newPosition)を実行することで、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1671</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力先の位置を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1672</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1673</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1674</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1675</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1676</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1677</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1678</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1679</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1680</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      byte[] src = { 0,  1,  2,  3,  4,  5,  6,  7</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1681</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *                  ,  8,  9, 10, 11, 12, 13, 14, 15</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1682</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *                  , 16, 17, 18, 19, 20, 21, 22     };</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1683</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int buffType = FileChUtil.USE_ALLOCATED_BUFFER;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1684</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      File file = new File("C:\\temp\\test.bin");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1685</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChannel channel = FileChUtil.newFileChannel(file, "W", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1686</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ByteBuffer buff = FileChUtil.getWriteBuffer(channel, buffType, 10);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1687</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1688</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int wroteSize = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1689</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int srcOffset = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1690</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1691</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** you can set new output position before write.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1692</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // channel.position(7);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1693</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      while(wroteSize != -1){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1694</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          wroteSize = FileChUtil.writeTo(channel,  src, srcOffset, buff, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1695</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          srcOffset += 10;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1696</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1697</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      System.out.println("Target Size = " + channel.size());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1698</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.closeQuietly(channel);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1699</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1700</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** if you want to delete target file;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1701</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // buff = null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1702</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // file.delete();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1703</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1704</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      -------------------------------------------------------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1705</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      output file : "C:\temp\test.bin"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1706</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      hex content (23 bytes) :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1707</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1708</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1709</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |10 11 12 13 14 15 16                            |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1710</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1711</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1712</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1713</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1714</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 出力先となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1715</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param src 出力したいデータが格納されたバイト配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1716</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param srcOffset src中の出力起点となるオフセット位置。出力毎に指定する必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1717</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff getWriteBuffer()で取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1718</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1719</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 出力したバイト数。ソースデータの終端なら -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1720</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1721</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1722</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> writeTo(FileChannel channel, <span class="keyword">byte</span>[] src, <span class="keyword">int</span> srcOffset,  ByteBuffer buff, <span class="keyword">int</span> buffType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1723</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//* [ WRITE ]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1724</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_WRAPPED_BYTE_ARRAY      : isDirect=false    &lt;-- Not Suppoted / 扱わない</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1725</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_ALLOCATED_BUFFER        : isDirect=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1726</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_DIRECT_ALLOCATED_BUFFER : isDirect=true</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1727</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_READ_WRITE      : isDirect=true</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1728</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_PRIVATE         : isDirect=true     &lt;-- Not Suppoted / 扱わない</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1729</td>  <td class="nbHitsCovered"><a title="Line 1729: Conditional coverage 100% (2/2).">&nbsp;21</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1729: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (srcOffset &gt;= src.length) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1730</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> -1;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1731</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1732</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> wroteSize = 0;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1733</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> writeLength = buff.capacity();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1734</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1735</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// src末尾の読み出し残量によって、バッファのlimitを調整</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1736</td>  <td class="nbHitsCovered"><a title="Line 1736: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1736: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> ((src.length - srcOffset) &lt; writeLength) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1737</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            writeLength = src.length - srcOffset;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1738</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            buff.limit(writeLength);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1739</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1740</td>  <td class="nbHitsCovered"><a title="Line 1740: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1740: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">if</span> (    buffType == USE_ALLOCATED_BUFFER || buffType == USE_DIRECT_ALLOCATED_BUFFER) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1741</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            (buff).put(src, srcOffset, writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1742</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            buff.position(0);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1743</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            wroteSize = channel.write(buff);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1744</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            buff.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1745</td>  <td class="nbHitsCovered"><a title="Line 1745: Conditional coverage 100% (2/2).">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1745: Conditional coverage 100% (2/2).">        } <span class="keyword">else</span> <span class="keyword">if</span>(buffType == USE_MAPMODE_READ_WRITE) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1746</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            buff = channel.map(FileChannel.MapMode.READ_WRITE, channel.position(), writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1747</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            (buff).put(src, srcOffset, writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1748</td>  <td class="nbHitsCovered"><a title="Line 1748: Conditional coverage 100% (2/2).">&nbsp;3</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1748: Conditional coverage 100% (2/2).">            <span class="keyword">if</span>(channel.position() == 0){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1749</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;                channel.position(buff.capacity());</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1750</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1751</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            wroteSize = writeLength;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1752</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1753</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForWriteBufferTypeError(buffType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1754</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1755</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> wroteSize;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1756</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1757</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1758</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1759</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1760</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してbyte配列のデータを一括出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1761</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * byte配列をFileChannelの現在のポジションから書き出し、そのFileChannel自身を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1762</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 書き出し処理は、ポジションを明示的に操作する必要無しに連続しておこなえる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1763</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (当該FileChannelのポジションは、書き出したバイト数に応じて増加する)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1764</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1765</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ(ByteBuffer)は、メソッド実行毎に新たに割り当てられる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1766</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 単一のバッファを再利用して細かい処理がしたい場合は、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1767</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * #writeTo(FileChannel, byte[], int, ByteBuffer, int)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1768</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * を使うと良い。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1769</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1770</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 対象となるFileChannelに対して、事前にFileChannel#position(long newPosition)を実行することで、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1771</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力先の位置を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1772</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1773</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1774</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1775</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1776</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1777</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   4) FileChUtil.USE_WRAPPED_BYTE_ARRAY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1778</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1779</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1780</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      File file = new File("C:\\temp\\test.bin");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1781</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      file.createNewFile();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1782</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1783</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** retrieve new FileChannel.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1784</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChannel ch = FileChUtil.newFileChannel(file, "w", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1785</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int bufType = FileChUtil.USE_ALLOCATED_BUFFER;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1786</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1787</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** source byte datas.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1788</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      byte[][] src = {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1789</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *           { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1790</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          ,{ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18 }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1791</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          ,{ 0x20, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1792</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          ,{ 0x30, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1793</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      };</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1794</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1795</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** continuative write source.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1796</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.writeTo(ch, src[0], bufType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1797</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.writeTo(ch, src[1], bufType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1798</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.writeTo(ch, src[2], bufType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1799</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1800</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** position skip (8 bytes)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1801</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.incPosition(ch, 8);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1802</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1803</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** write final</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1804</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.writeTo(ch, src[3], bufType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1805</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1806</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** close FileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1807</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.closeQuietly(ch);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1808</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1809</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      -------------------------------------------------------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1810</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      output file : "C:\temp\test.bin"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1811</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      hex content (40 bytes) :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1812</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1813</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |01 02 03 04 05 06 07 08 11 12 13 14 15 16 17 18 |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1814</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |20 29 2A 2B 2C 2D 2E 2F 00 00 00 00 00 00 00 00 |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1815</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |30 39 3A 3B 3C 3D 3E 3F                         |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1816</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1817</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1818</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1819</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1820</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 出力対象となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1821</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data ソースとなるbyte配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1822</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param bufferType バッファタイプ</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1823</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 出力対象のFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1824</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1825</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @see #writeTo(FileChannel, byte[], int, ByteBuffer, int)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1826</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1827</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel writeTo(FileChannel channel, <span class="keyword">byte</span>[] data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1828</td>  <td class="nbHitsCovered"><a title="Line 1828: Conditional coverage 100% (6/6).">&nbsp;51</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1828: Conditional coverage 100% (6/6).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1829</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1830</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> writeToFileChannelViaAB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1831</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1832</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> writeToFileChannelViaDAB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1833</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_WRITE :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1834</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> writeToFileChannelViaMBB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1835</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_WRAPPED_BYTE_ARRAY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1836</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> writeToFileChannelViaWBB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1837</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1838</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1839</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1840</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1841</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1842</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForWriteBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1843</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1844</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1845</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1846</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span>  <span class="keyword">static</span> FileChannel writeToFileChannelViaAB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1847</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocate(data.length);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1848</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1849</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        buf.flip();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1850</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        channel.write(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1851</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1852</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1853</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1854</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span>  <span class="keyword">static</span> FileChannel writeToFileChannelViaDAB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1855</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocateDirect(data.length);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1856</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1857</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;        buf.flip();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1858</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;        channel.write(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1859</td>  <td class="nbHitsCovered">&nbsp;21</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1860</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1861</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1862</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> FileChannel writeToFileChannelViaWBB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1863</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        channel.write(ByteBuffer.wrap(data));</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1864</td>  <td class="nbHitsCovered">&nbsp;9</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1865</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1866</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1867</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> FileChannel writeToFileChannelViaMBB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1868</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        MappedByteBuffer buf = channel.map(FileChannel.MapMode.READ_WRITE, 0, data.length);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1869</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1870</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        buf.force();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1871</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1872</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1873</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1874</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1875</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1876</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1877</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してint配列のデータを一括出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1878</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * int配列の各要素の下位8bit値を、FileChannelの現在のポジションからbyte単位で書き出す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1879</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1880</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1881</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1882</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1883</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return FileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1884</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1885</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1886</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel writeTo(FileChannel channel, <span class="keyword">int</span>[] data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1887</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] outData = <span class="keyword">new</span> <span class="keyword">byte</span>[data.length];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1888</td>  <td class="nbHitsCovered"><a title="Line 1888: Conditional coverage 100% (2/2).">&nbsp;63</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1888: Conditional coverage 100% (2/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; data.length; i++) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1889</td>  <td class="nbHitsCovered">&nbsp;55</td>  <td class="src"><pre class="src">&nbsp;            outData[i] = (<span class="keyword">byte</span>)data[i];</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1890</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1891</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> writeTo(channel, outData, bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1892</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1893</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1894</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1895</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1896</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してString型のデータを一括出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1897</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1898</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1899</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1900</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1901</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1902</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1903</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1904</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel writeTo(FileChannel channel, String data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1905</td>  <td class="nbHitsCovered">&nbsp;22</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> writeTo(channel, data.getBytes(), bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1906</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1907</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1908</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1909</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1910</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してString型のデータをエンコードを指定して一括出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1911</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1912</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1913</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1914</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1915</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param encoding</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1916</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1917</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnsupportedEncodingException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1918</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1919</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1920</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel writeTo(FileChannel channel, String data, <span class="keyword">int</span> bufferType, String encoding) <span class="keyword">throws</span> UnsupportedEncodingException, IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;1921</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> writeTo(channel, data.getBytes(encoding), bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1922</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1923</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1924</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1925</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1926</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1927</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してbyte配列のデータを追記出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1928</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力ソースとなるbyte配列のデータを、対象となるFileChannelの末尾以降に対しByteBufferを経由して</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1929</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 追加出力(append)し、出力したバイト数を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1930</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力ソースとなるbyte配列データ中の、出力オフセットであるsrcOffsetが配列末尾またはそれを越えた場合は</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1931</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力はおこなわれず、戻り値として -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1932</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1933</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * byte配列データを、小さなバッファを介しFileChannelに断続的・順番に追加出力する場合などに利用する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1934</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 一回に書き出されるサイズの上限は、バッファサイズに依存する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1935</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1936</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力ソース中の起点オフセットであるsrcOffsetは、出力毎に更新する必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1937</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1938</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1939</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1940</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1941</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1942</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1943</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1944</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1945</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1946</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** Create a null file with a length 32 byte.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1947</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      String target = "C:\\temp\\test.bin";</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1948</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      RandomAccessFile raf = new RandomAccessFile(target, "rw");</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1949</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      raf.setLength(32);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1950</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      raf.close();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1951</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1952</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** Prepare for append.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1953</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      byte[] src = { 0,  1,  2,  3,  4,  5,  6,  7</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1954</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *                  ,  8,  9, 10, 11, 12, 13, 14, 15</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1955</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *                  , 16, 17, 18, 19, 20, 21, 22    };</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1956</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int buffType = FileChUtil.USE_ALLOCATED_BUFFER;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1957</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1958</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      File file = new File(target);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1959</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChannel channel = FileChUtil.newFileChannel(file, "A", true);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1960</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      ByteBuffer buff = FileChUtil.getAppendBuffer(channel, buffType, 10);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1961</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1962</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int wroteSize = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1963</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      int srcOffset = 0;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1964</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1965</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** Start append.</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1966</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      while(wroteSize != -1){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1967</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          wroteSize = FileChUtil.appendTo(channel,    src, srcOffset, buff, buffType);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1968</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *          srcOffset += 10;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1969</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1970</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      System.out.println("Target Size = " + channel.size());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1971</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      FileChUtil.closeQuietly(channel);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1972</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1973</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      // *** if you want to delete target file;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1974</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //buff = null;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1975</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      //file.delete();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1976</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1977</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      -------------------------------------------------------</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1978</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      output file : "C:\temp\test.bin"</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1979</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      hex content (55 bytes) :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1980</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1981</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1982</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1983</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1984</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      |10 11 12 13 14 15 16                            |</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1985</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *      +------------------------------------------------+</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1986</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1987</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1988</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1989</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 出力先となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1990</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param src 出力したいデータが格納されたバイト配列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1991</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param srcOffset src中の出力起点となるオフセット位置。出力毎に指定する必要がある。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1992</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff getApendBuffer()で取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1993</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1994</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 出力したバイト数。ソースデータの終端なら -1 を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1995</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1996</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1997</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> appendTo(FileChannel channel, <span class="keyword">byte</span>[] src, <span class="keyword">int</span> srcOffset,  ByteBuffer buff, <span class="keyword">int</span> buffType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLine">&nbsp;1998</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//* [ WRITE ]</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;1999</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_WRAPPED_BYTE_ARRAY      : isDirect=false    &lt;-- Not Suppoted / 扱わない</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2000</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_ALLOCATED_BUFFER        : isDirect=false</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2001</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_DIRECT_ALLOCATED_BUFFER : isDirect=true</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2002</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_READ_WRITE      : isDirect=true</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2003</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">//*     USE_MAPMODE_PRIVATE         : isDirect=true     &lt;-- Not Suppoted / 扱わない</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2004</td>  <td class="nbHitsCovered"><a title="Line 2004: Conditional coverage 100% (2/2).">&nbsp;21</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2004: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (srcOffset &gt;= src.length) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2005</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> -1;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2006</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2007</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> wroteSize = 0;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2008</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">int</span> writeLength = buff.capacity();</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2009</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2010</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="comment">// src末尾の読み出し残量によって、バッファのlimitを調整</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2011</td>  <td class="nbHitsCovered"><a title="Line 2011: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2011: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> ((src.length - srcOffset) &lt; writeLength) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2012</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            writeLength = src.length - srcOffset;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2013</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            buff.limit(writeLength);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2014</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2015</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2016</td>  <td class="nbHitsCovered"><a title="Line 2016: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2016: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">        <span class="keyword">if</span> (    buffType == USE_ALLOCATED_BUFFER || buffType == USE_DIRECT_ALLOCATED_BUFFER) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2017</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            (buff).put(src, srcOffset, writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2018</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            buff.position(0);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2019</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            wroteSize = channel.write(buff);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2020</td>  <td class="nbHitsCovered">&nbsp;12</td>  <td class="src"><pre class="src">&nbsp;            buff.clear();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2021</td>  <td class="nbHitsCovered"><a title="Line 2021: Conditional coverage 100% (2/2).">&nbsp;4</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2021: Conditional coverage 100% (2/2).">        } <span class="keyword">else</span> <span class="keyword">if</span>(buffType == USE_MAPMODE_READ_WRITE) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2022</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">long</span> chPos = channel.position();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2023</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            buff = channel.map(FileChannel.MapMode.READ_WRITE, channel.position(), writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2024</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            channel.position(chPos);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2025</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            (buff).put(src, srcOffset, writeLength);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2026</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            channel.position(channel.position() + writeLength );</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2027</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;            wroteSize = writeLength;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2028</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2029</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForAppendBufferTypeError(buffType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2030</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2031</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> wroteSize;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2032</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2033</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2034</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2035</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2036</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2037</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してbyte配列のデータを一括で追記出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2038</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * byte配列をFileChannelの末尾のポジション以降に追記し、そのFileChannel自身を返す。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2039</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 書き出し処理は、ポジションを明示的に操作する必要無しに連続しておこなえる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2040</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * (当該FileChannelのポジションは、書き出したバイト数に応じて増加する)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2041</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2042</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * バッファ(ByteBuffer)は、メソッド実行毎に新たに割り当てられる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2043</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 単一のバッファを再利用して細かい処理がしたい場合は、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2044</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * #appendTo(FileChannel, byte[], int, ByteBuffer, int)</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2045</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * を使うと良い。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2046</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2047</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 対象となるFileChannelに対して、事前にFileChannel#position(long newPosition)を実行することで、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2048</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 出力先の位置を指定できる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2049</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2050</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 利用可能なバッファの種類：</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2051</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   1) FileChUtil.USE_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2052</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   2) FileChUtil.USE_DIRECT_ALLOCATED_BUFFER</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2053</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   3) FileChUtil.USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2054</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *   4) FileChUtil.USE_WRAPPED_BYTE_ARRAY</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2055</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2056</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Example :</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2057</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2058</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2059</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2060</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2061</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2062</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2063</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2064</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2065</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2066</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2067</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2068</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel appendTo(FileChannel channel, <span class="keyword">byte</span>[] data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2069</td>  <td class="nbHitsCovered"><a title="Line 2069: Conditional coverage 100% (6/6).">&nbsp;63</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2069: Conditional coverage 100% (6/6).">        <span class="keyword">switch</span> (bufferType) {</a></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2070</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2071</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> appendToFileChannelViaAB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2072</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_DIRECT_ALLOCATED_BUFFER :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2073</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> appendToFileChannelViaDAB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2074</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_WRITE :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2075</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> appendToFileChannelViaMBB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2076</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_WRAPPED_BYTE_ARRAY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2077</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> appendToFileChannelViaWBB(channel, data);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2078</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">case</span> USE_MAPMODE_READ_ONLY :</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2079</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2080</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        <span class="keyword">default</span> :</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2081</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            <span class="keyword">break</span>;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2082</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2083</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">throw</span> <span class="keyword">new</span> IOException(getMessageForWriteBufferTypeError(bufferType));</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2084</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2085</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2086</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span>  <span class="keyword">static</span> FileChannel appendToFileChannelViaAB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2087</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocate(data.length);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2088</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2089</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        buf.flip();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2090</td>  <td class="nbHitsCovered"><a title="Line 2090: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2090: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel.position() &lt; channel.size()){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2091</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channel.position(channel.size());</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2092</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2093</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        channel.write(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2094</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2095</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2096</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2097</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span>  <span class="keyword">static</span> FileChannel appendToFileChannelViaDAB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2098</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        ByteBuffer buf = ByteBuffer.allocateDirect(data.length);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2099</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2100</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        buf.flip();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2101</td>  <td class="nbHitsCovered"><a title="Line 2101: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2101: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel.position() &lt; channel.size()){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2102</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            channel.position(channel.size());</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2103</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2104</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        channel.write(buf);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2105</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2106</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2107</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2108</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> FileChannel appendToFileChannelViaWBB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2109</td>  <td class="nbHitsCovered"><a title="Line 2109: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2109: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel.position() &lt; channel.size()){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2110</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            channel.position(channel.size());</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2111</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2112</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        channel.write(ByteBuffer.wrap(data));</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2113</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2114</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2115</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2116</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">private</span> <span class="keyword">static</span> FileChannel appendToFileChannelViaMBB(FileChannel channel, <span class="keyword">byte</span>[] data) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2117</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        MappedByteBuffer buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2118</td>  <td class="nbHitsCovered"><a title="Line 2118: Conditional coverage 100% (2/2).">&nbsp;15</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2118: Conditional coverage 100% (2/2).">        <span class="keyword">if</span>(channel.position() &lt; channel.size()){</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2119</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            buf = channel.map(FileChannel.MapMode.READ_WRITE, channel.size(), data.length);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2120</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2121</td>  <td class="nbHitsCovered">&nbsp;13</td>  <td class="src"><pre class="src">&nbsp;            buf = channel.map(FileChannel.MapMode.READ_WRITE, channel.position(), data.length);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2122</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2123</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        buf.put(data);</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2124</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        buf.force();</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2125</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        buf = <span class="keyword">null</span>;</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2126</td>  <td class="nbHitsCovered">&nbsp;15</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> channel;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2127</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2128</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2129</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2130</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2131</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2132</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2133</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2134</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してint配列のデータを一括で追記出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2135</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * int配列の各要素の下位8bit値を、FileChannelの現在のポジションからbyte単位で追記する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2136</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2137</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2138</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2139</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2140</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2141</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2142</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2143</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2144</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel appendTo(FileChannel channel, <span class="keyword">int</span>[] data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2145</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">byte</span>[] outData = <span class="keyword">new</span> <span class="keyword">byte</span>[data.length];</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2146</td>  <td class="nbHitsCovered"><a title="Line 2146: Conditional coverage 100% (2/2).">&nbsp;20</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2146: Conditional coverage 100% (2/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; data.length; i++) {</a></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2147</td>  <td class="nbHitsCovered">&nbsp;16</td>  <td class="src"><pre class="src">&nbsp;            outData[i] = (<span class="keyword">byte</span>)data[i];</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2148</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2149</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> appendTo(channel, outData, bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2150</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2151</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2152</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2153</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2154</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してString型のデータを一括で追記出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2155</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2156</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2157</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2158</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2159</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2160</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2161</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2162</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel appendTo(FileChannel channel, String data, <span class="keyword">int</span> bufferType) <span class="keyword">throws</span> IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2163</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> appendTo(channel, data.getBytes(), bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2164</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2165</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2166</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2167</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2168</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelに対してString型のデータをエンコードを指定して一括出力する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2169</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2170</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2171</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2172</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2173</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param data</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2174</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param encoding</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2175</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return 使用したFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2176</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws UnsupportedEncodingException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2177</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2178</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2179</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> FileChannel appendTo(FileChannel channel, String data, <span class="keyword">int</span> bufferType, String encoding) <span class="keyword">throws</span> UnsupportedEncodingException, IOException {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2180</td>  <td class="nbHitsCovered">&nbsp;20</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> appendTo(channel, data.getBytes(encoding), bufferType);</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2181</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2182</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2183</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2184</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2185</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2186</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * FileChannelからByteBufferを経由し、文字エンコーディングを指定してCharBufferに文字列を読み込む。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2187</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * その際、エンコーディングに応じてByteBufferのサイズに収まるように、文字列末尾を調整する。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2188</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2189</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 用途としては、マルチバイト文字列の先頭から、指定バイト数以下で収めつつ文字列末尾が</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2190</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * 不自然に欠けたりしないようにして順に読み込む場合など。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2191</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2192</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * Data-Example:</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2193</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    Shift_JISで "日本国" (93 FA 96 7B 8D 91) を6バイトのByteBufferで読み込む場合、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2194</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    CharBufferに格納されるデータは6バイトフルで</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2195</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[0] = '日'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2196</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[1] = '本'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2197</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[2] = '国'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2198</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    となる。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2199</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2200</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    Shift_JISで "日本@国" (93 FA 96 7B 40 8D 91) を同様に6バイトのByteBufferで読み込む場合、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2201</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[0] = '日'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2202</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[1] = '本'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2203</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    ・CharBuffer[2] = '@'</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2204</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    となり、6バイトのByteBufferでは '国' の2バイト中の1バイト(8D)だけが対象となるため、</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2205</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    この文字自体を読み込まない。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2206</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *    次の読み込みは、6バイト目の '国' から開始される。</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2207</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2208</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2209</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2210</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2211</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2212</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2213</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2214</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff getReadBuffer()で取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2215</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_ONLY / USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2216</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param charsetName 文字エンコーディング</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2217</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return ByteBufferのサイズ以下で収まるように切り出された文字列を格納したCharBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2218</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2219</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2220</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> CharBuffer truncTo(FileChannel channel, ByteBuffer buff, <span class="keyword">int</span> buffType, String charsetName) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2221</td>  <td class="nbHitsUncovered"><a title="Line 2221: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2221: Conditional coverage 0% (0/2).">        <span class="keyword">if</span>(channel.position() &gt;= channel.size()){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2222</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2223</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2224</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        CharsetDecoder decoder = Charset.forName(charsetName).newDecoder();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2225</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        CharBuffer cBuff = CharBuffer.allocate(buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2226</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2227</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        int jisAdjust = 0;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2228</td>  <td class="nbHitsUncovered"><a title="Line 2228: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2228: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        <span class="keyword">if</span> (buffType == USE_ALLOCATED_BUFFER || buffType == USE_DIRECT_ALLOCATED_BUFFER) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2229</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            buff.clear();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2230</td>  <td class="nbHitsUncovered"><a title="Line 2230: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2230: Conditional coverage 0% (0/2).">            <span class="keyword">if</span>(channel.read(buff) &lt;= 0){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2231</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2232</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2233</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            buff.flip();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2234</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(charsetName.equals("JIS")){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2235</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                jisAdjust = getAdjustBuffLimit_JIS(buff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2236</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2237</td>  <td class="nbHitsUncovered"><a title="Line 2237: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2237: Conditional coverage 0% (0/2).">            <span class="keyword">if</span>(buff.hasRemaining()){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2238</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                decoder.decode(buff, cBuff, <span class="keyword">true</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2239</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                channel.position(channel.position() - buff.remaining() - jisAdjust);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2240</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                channel.position(channel.position() - buff.remaining());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2241</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2242</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> cBuff;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2243</td>  <td class="nbHitsUncovered"><a title="Line 2243: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2243: Conditional coverage 0% (0/4) [each condition: 0%, 0%].">        }<span class="keyword">else</span> <span class="keyword">if</span>(buffType == USE_MAPMODE_READ_ONLY || buffType == USE_MAPMODE_READ_WRITE){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2244</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">long</span> chRemain = channel.size() - channel.position();</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2245</td>  <td class="nbHitsUncovered"><a title="Line 2245: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2245: Conditional coverage 0% (0/2).">            <span class="keyword">if</span> (chRemain == 0) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2246</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2247</td>  <td class="nbHitsUncovered"><a title="Line 2247: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2247: Conditional coverage 0% (0/2).">            } <span class="keyword">else</span> <span class="keyword">if</span> (chRemain &gt; buff.capacity()) {</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2248</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                buff = channel.map(mapmode[buffType], channel.position(), buff.capacity());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2249</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            } <span class="keyword">else</span> {</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2250</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                buff = channel.map(mapmode[buffType], channel.position(), chRemain);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2251</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2252</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            if(charsetName.equals("JIS")){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2253</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                jisAdjust = getAdjustBuffLimit_JIS(buff);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2254</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            }</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2255</td>  <td class="nbHitsUncovered"><a title="Line 2255: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2255: Conditional coverage 0% (0/2).">            <span class="keyword">if</span>(buff.hasRemaining()){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2256</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                decoder.decode(buff, cBuff, <span class="keyword">true</span>);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2257</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//                channel.position(channel.position() + buff.position() - jisAdjust);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2258</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;                channel.position(channel.position() + buff.position());</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2259</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2260</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2261</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        <span class="keyword">return</span> cBuff;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2262</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2263</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2264</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2265</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2266</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2267</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2268</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2269</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/pre&gt;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2270</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2271</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param channel 入力元となるFileChannel</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2272</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buff getReadBuffer()で取得したByteBuffer</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2273</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param buffType バッファの種類。USE_ALLOCATED_BUFFER / USE_DIRECT_ALLOCATED_BUFFER / USE_MAPMODE_READ_ONLY / USE_MAPMODE_READ_WRITE</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2274</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param charsetName 文字エンコーディング</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2275</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return ByteBufferのサイズ以下で収まるように切り出された文字列</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2276</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws IOException</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2277</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2278</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> String truncToStr(FileChannel channel, ByteBuffer buff, <span class="keyword">int</span> buffType, String charsetName) <span class="keyword">throws</span> IOException{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2279</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        CharBuffer cBuff = truncTo(channel, buff, buffType, charsetName);</span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2280</td>  <td class="nbHitsUncovered"><a title="Line 2280: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2280: Conditional coverage 0% (0/2).">        <span class="keyword">if</span>(cBuff != <span class="keyword">null</span>){</a></span></pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2281</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> (<span class="keyword">new</span> String(cBuff.array()));</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2282</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }<span class="keyword">else</span>{</pre></td></tr>
<tr>  <td class="numLineCover">&nbsp;2283</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span> <span class="keyword">null</span>;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2284</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2285</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2286</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2287</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2288</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2289</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2290</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2291</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2292</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    private static final CharBuffer trunc(final CharsetEncoder encoder, final CharBuffer cBuff, final int buffSize) throws CharacterCodingException {</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2293</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        if (buffSize &gt;= encoder.maxBytesPerChar() * cBuff.limit()){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2294</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            return cBuff;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2295</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2296</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        final ByteBuffer tmp = ByteBuffer.allocate(buffSize);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2297</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        encoder.reset();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2298</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        CoderResult result = cBuff.hasRemaining() ? encoder.encode(cBuff, tmp, true) : CoderResult.UNDERFLOW ;</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2299</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        if (result.isUnderflow()){</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2300</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//            result = encoder.flush(tmp);</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2301</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2302</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//        return (CharBuffer)cBuff.flip();</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2303</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;<span class="comment">//    }</span></pre></td></tr>
<tr>  <td class="numLine">&nbsp;2304</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2305</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2306</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2307</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2308</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;}</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2309</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2310</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr>  <td class="numLine">&nbsp;2311</td>  <td class="nbHits">&nbsp;</td>
  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
</table>

<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 1.9.4.1 on 11/08/15 23:38.</div>
</body>
</html>
